[SPARK-11949][SQL] Set field nullable property for GroupingSets to get correct results for null values#10038
[SPARK-11949][SQL] Set field nullable property for GroupingSets to get correct results for null values#10038viirya wants to merge 2 commits intoapache:masterfrom
Conversation
|
Test build #46876 has finished for PR 10038 at commit
|
|
Test build #46879 has finished for PR 10038 at commit
|
|
retest this please. |
|
So, the problem is caused by the nullability setting? Does rollup have the same problem? |
|
@yhuai yeah. Because rollup and cube will be transformed to |
|
Test build #46888 has finished for PR 10038 at commit
|
There was a problem hiding this comment.
Maybe we need to check the bitmasks? I mean if we something like GROUPING SETS ( (a,b), a), we do not need to change the nullability of a, right?
There was a problem hiding this comment.
(this is a minor issue since setting nullable to true does not cause wrong results)
There was a problem hiding this comment.
Indeed, I think you are right. I will update this later. Thanks.
There was a problem hiding this comment.
Do you want to update it in this PR?
There was a problem hiding this comment.
This can be merged first. I will add a following one for the issue later. If it is ok for you.
There was a problem hiding this comment.
OK. Sounds good. I will add a TODO at here when I merge it.
There was a problem hiding this comment.
Friendly ping, if we can fix this last comment we can probably include this in 1.6-RC1.
|
@viirya Thank you for the fix. It overall looks good. Can you update the title to make it provide more information about the issue? |
|
@yhuai It is updated. |
|
@yhuai Is this title ok for you? |
|
Merging to master and branch 1.6. |
…t correct results for null values JIRA: https://issues.apache.org/jira/browse/SPARK-11949 The result of cube plan uses incorrect schema. The schema of cube result should set nullable property to true because the grouping expressions will have null values. Author: Liang-Chi Hsieh <viirya@appier.com> Closes #10038 from viirya/fix-cube. (cherry picked from commit c87531b) Signed-off-by: Yin Huai <yhuai@databricks.com>
JIRA: https://issues.apache.org/jira/browse/SPARK-11949
The result of cube plan uses incorrect schema. The schema of cube result should set nullable property to true because the grouping expressions will have null values.